import request from '@/request/request.js'

// 请求首页的数据
export const getHomeList = () => request.get('/index/index')
// 获取搜索弹出框数据
export const getSearchPopupData = () => request.get('/search/index')
// 获取实时搜索的文本提示数据列表
export const getSearchTipsListData = params => request.get('/search/helper', {params})
//获取商品搜索的列表数据
export const getGoodsList = params => request.get('/goods/list', {params})
// 清除历史记录
export const clearHistory = params => request.post('/search/clearhistory')
// 用户登录
export const goLogin = params => request.post('/auth/loginByWeb', params)
//产品详情页
export const getGoodsDatail = params => request.get('/goods/detail', {params})
// 相关产品
export const getGoodsXiangGuan = params => request.get('/goods/related', {params})
// 获取购物车产品数量
export const getGoodsCount = () => request.get('/cart/goodscount')
// 加入购物车
export const addCart = params => request.post('/cart/add', params)
// 获取购物车数据
export const getCart = () => request.get('/cart/index')
// 点击切换商品选中状态（含全选）
export const changeGoodChecked = params => request.post('/cart/checked', params)
//商品步进器
export const changeStepper = params => request.post('/cart/update', params)
// 删除商品
export const deleteGood = params => request.post('/cart/delete', params)
// 专题列表
export const getTopicList = (params) => request.get('/topic/list', {params})
// 获取全部分类数据
export const getCatalog = () => request.get('/catalog/index')
//品牌详情
export const getDetail = params => request.get('/brand/detail', {params})
// 品牌详情中的产品列表
export const getPinPaiList = params => request.get('/goods/list', {params})
// 分类数据获取
export const getCategory = params => request.get('/goods/category', {params})
// 分类页面商品列表请求
export const getFenLeiList = params => request.get('/goods/list', {params})
//获取当前分类的列表数据
export const getZiFenLeiList = params => request.get('/catalog/current', {params})
























